API For Service Event Rules

There have been a few previous requests for an API for service event rules.

I was wondering if there have been any updates on this front?
Our use case is to have per service rules to set the urgency of an incident based on content within the message. We are generating alerts from within datadog and want to be able to mark some as Low and some as High.

We have tens of services so doing this via the UI is slow.

Is there another way of setting the priority on alerts coming from datadog?

Hello ZacharyCicala,

It is possible to assign priority to Alerts using Rulesets.

As to creating Service level event rules using the API, I would have a colleague come back to you on that.

Cheers,

Hi @ZacharyCicala,

For now the only API available for rule creation is for Global Rulesets. A Service Event Rule API is in our future plans but we are working on a few other things first.
Chiedu is spot on as Datadog events can be sent to a ruleset where the priority can be set and the rule can also route it to the right service.

@Inactive-Member-99077006 DataDog allows us to direct alerts to the correct service by using "@PagerDuty-[ServiceName] "

With Rulesets it seems like I not only need to set the priority but also redirect the alert to a new service. Can I create a RuleSet that sets the priority but uses the existing Service routing from DataDog?

Hi @ZacharyCicala,

If the issue is just to set priority, you can configure event rules at the Service level to achieve that. Using ruleset would require you to send the alert to the Ruleset endpoint, then routing accordingly. I hope that helps

@ZacharyCicala

Final update on this thread - we are happy to announce that our Service Event Rules API is Generally Available. You can find the CRUD Calls nested in the Services Endpoint:
https://developer.pagerduty.com/api-reference/reference/REST/openapiv3.json/paths/~1services~1{id}~1rules/post